validation added to NumericalInput to just accept numerical values on block creation form#2615
Conversation
|
Thanks for the pull request, @jesusbalderramawgu! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
Suggestion: In the description of the PR you can add |
|
You need to follow the conventional commits messages |
|
Thanks! Let me know once the other reviewers have approved it, or if you need me to approve some more test runs. |
kdmccormick
left a comment
There was a problem hiding this comment.
Thanks for your work so far @jesusbalderramawgu !
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2615 +/- ##
==========================================
+ Coverage 94.81% 94.92% +0.11%
==========================================
Files 1225 1239 +14
Lines 27481 28448 +967
Branches 6187 6296 +109
==========================================
+ Hits 26056 27005 +949
- Misses 1367 1385 +18
Partials 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Kyle McCormick <kyle@kylemccormick.me>
842e6a2 to
14d2c72
Compare
thanks, I made the change in the current commit messages and I'll keep this in mind for future PR |
… to see if is a valid math expression
|
I believe this is blocked on openedx/openedx-platform#37677 |
|
@bradenmacdonald The linked edx-platform PR is unblocked now, would you like to review this or should I? |
|
@kdmccormick I can review. |
| )} | ||
| {isPending && ( | ||
| <Spinner animation="border" className="mie-3 mt-3" screenReaderText="loading" /> | ||
| )} |
There was a problem hiding this comment.
Why did you remove the spinner?
There was a problem hiding this comment.
because I realized it wasn't necessary, none of the forms have it. Also it was causing a bouncing in the modal on typing.
|
Please get the coverage test passing again and then I can approve and merge. |
|
Description
There's a bug with Numerical Input Component which Incorrectly Handles Formulas as numericalresponse.
after some research and talking with the community we agreed to validate the author block form to just accept numeric values in the answers.
this is how the form will show the error if the value is not numeric.
Testing instructions
First you need to use edx-platform with this branch OEXCOM-245/numericalinput-validation
Then you will be redirected to this view

Select the "Problem" button, then a modal will pop up and finally select the "Numerical input" option.
scroll down in the modal and you will see a block called "Answers"
In that input is where you can add the numerical input and see the response from the API.
Valid formula

Invalid formula